1. Field of the Invention
Methods and apparatuses consistent with the present invention relate to reducing errors that may occur in an on-screen display (OSD) image output device while outputting an image using a chroma-key as a color. More particularly, the present invention relates to an apparatus and method for outputting an image using a plurality of chroma-key colors that sets a block in a foreground image where the chroma-key is applied, applies N chroma-keys (at least two or more) in a predetermined area of the set block, and combines the foreground image with a background image by including p pixels that excludes n pixels and a parity bit in a horizontal line at the (N+1)th pixel.
2. Description of the Related Art
A chroma-key-color-application method, which is one of the methods for composing two images in an OSD image output device, applies a chroma key color to one of two images, which can be a background or a foreground.
The chroma-key color is an effect used when substituting an image by another image or color using a certain color of the image as a key (alpha channel). Keying refers to a process of superimposing a certain part of another image on a certain part of a random image, and refers to a process where an image or a caption to be composed is shown superimposed on the background image. Three types of keys: a chroma key, a luminance key and an external key are currently used in broadcasting and other fields.
A frame buffer is a memory device that temporarily stores image information to be shown on a screen using the raster scan method. A graphics processor receives a display list that expresses a figure from the CPU, converts the list, and records the converted list in the frame buffer. Each memory unit of the frame buffer is reflected on the screen as it is.
FIG. 1 illustrates the structure of an OSD image output device in the related art.
This device includes a system memory 100, a video controller 130, a display unit 160, and a microprocessor unit (MPU) 190.
The system memory 100 includes a background-frame buffer 110 that stores a background image 170, and a foreground-frame buffer 120 that stores a foreground image 180.
The video controller composes the foreground image 180 with the background image 180 where a chroma-key color can be applied in the MPU 190, and displays the composed image in the display unit 160 as if outputting one image.
The control logic 140 of the video controller 130 includes a chroma-key-color-storage unit 150 that stores one chroma-key color.
The MPU 190 applies the chroma-key color to the foreground image 180 using a chroma-key color stored in the chroma-key-color-storage unit 150, and applies the chroma-key color for all pixels of a part where the chroma-key color is applied in the foreground image 180.
FIG. 2 illustrates a method of outputting an OSD image according to the related art.
This method composes a background image 170 and a foreground image 180 where a chroma-key color is applied through the video controller 130, and displays the composed image as one image.
There is a window A 200, which is capable of reproducing video, and a window B 210 which may be used for some other purpose, and there is also a portion where window A 200 and window B are overlapped in a window system.
In other words, when composing the foreground image 180 width the background image 170, a predetermined area 220 of the foreground image, overlapped width window B 210, is handled to be transparent so that the window B 210 is not covered.
In order to make the area 220 transparent by applying one chroma-key color stored in the chroma-key-color-storage unit 150 to all pixels of the area 220 of the foreground image, the area 220 of the composed image 230 is handled to be transparent so that the window B 210 is not covered.
Likewise, according to the related art, the chroma-key color is applied to all pixels of the predetermined area 220, where the window A 200 and the window B 210 are overlapped, using one chroma-key color stored in the chroma-key-color-storage unit 150.
In the case where the foreground image 180, where the chroma-key color is applied, is not a still image, but a video, applying the chroma-key color to all pixels can lower the performance of the MPU 190 that applies the chroma-key color, and can lower the system performance by the overhead generated in the video controller 130 that composes the background image 170 and the foreground image 180 and displays the combined image.
Further, in the case where there is a color that is the same as the chroma-key color stored in the chroma-key-color-storage unit in the area where the window A 200 and the window B 210 are overlapped, the area can be erroneously shown as a transparent image when combined.